-- GENERATED SPELL FOR [Sunfury Archer] --


function spell0_19707(pUnit, Event) --@Immolation Arrow,n/a--
pUnit:FullCastSpellOnTarget(37847,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19707', 1000, 1)
end

function spell1_19707(pUnit, Event) --@Net,n/a--
pUnit:FullCastSpellOnTarget(12024,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19707', 5274, 1)
end

function spell2_19707(pUnit, Event) --@Shoot,n/a--
pUnit:FullCastSpellOnTarget(6660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_19707', 603, 1)
end

function Sorts_19707(pUnit, Event)
local choix_sorts_19707 = math.random(0, 2)
if choix_sorts_19707 == 0 then
pUnit:RegisterEvent('spell0_19707', 1, 1)
end
if choix_sorts_19707 == 1 then
pUnit:RegisterEvent('spell1_19707', 1, 1)
end
if choix_sorts_19707 == 2 then
pUnit:RegisterEvent('spell2_19707', 1, 1)
end
end

function mob19707_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_19707', math.random(1500, 3000), 1)
end

function mob19707_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19707_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob19707_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(19707, 1, 'mob19707_Action')
RegisterUnitEvent(19707, 2, 'mob19707_Leave')
RegisterUnitEvent(19707, 3, 'mob19707_Kill')
RegisterUnitEvent(19707, 4, 'mob19707_Die')
